//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.aidong.dao.wills;

import com.aidong.dao.base.OrderSet;
import com.aidong.dao.wills.BaseDao;
import com.aidong.model.wills.CardTimeLimit;
import java.util.List;
import org.springframework.stereotype.Repository;

@Repository
public class CardTimeLimitDao extends BaseDao<CardTimeLimit, Integer> {
    public CardTimeLimitDao() {
    }

    public List<CardTimeLimit> getCardTimeLimitList(String cardType) {
        return this.queryList("cardTypeCode=:p1", new Object[]{cardType}, (OrderSet)null, -1);
    }

    public boolean chkTimeLimit(String cardType, String dayId, String time) {
        String sql = "select status from CardTimeLimit where cardTypeCode=:p1 and dayId=:p2 and beginTime<=:p3 and endTime>=:p4";
        Integer st = (Integer)this.getBySql(Integer.class, sql, new Object[]{cardType, dayId, time, time});
        return st != null && st.intValue() == 1;
    }
}
